class Solution:
    def isPalindrome(self, x: int) -> bool:
        x = str(x)
        n = len(x)
        for i in range(n // 2 + 1):
            if x[i] != x[n - 1 - i]:
                return False
        return True
    

so = Solution()
x = 121
print(so.isPalindrome(x))